<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once('include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php');

class SugarWidgetSubPanelTopCreateScheduleNoteButton extends SugarWidgetSubPanelTopButtonQuickCreate
{

	function __construct(){
		$title = 'LBL_NEW_BUTTON_TITLE';
                $accesskey = 'LBL_NEW_BUTTON_KEY';
                $value = 'LBL_NEW_BUTTON_LABEL';
                $module = 'edanz_ScheduleNotes';
		return parent::__construct($module, $title, $accesskey, $value);
	}

	function display($defines, $additionalFormFields = null)
	{
		$this->acl = 'edit';
		if(isset($defines['focus']->id))
			$additionalFormFields['related_editor_id'] = $defines['focus']->id;
		if(isset($defines['focus']->full_name))
			$additionalFormFields['related_editor_name'] = $defines['focus']->full_name;
			
		return parent::display($defines, $additionalFormFields);
	}
	
}
?>
